Conversation
38c3dc6 to
45dd05a
Compare
bmarty
left a comment
There was a problem hiding this comment.
Thanks. Can you check the LFS issue please?
| @@ -1 +1,2 @@ | |||
| **/snapshots/**/*.png filter=lfs diff=lfs merge=lfs -text | |||
| **/src/androidTest/assets/*.realm filter=lfs diff=lfs merge=lfs -text | |||
There was a problem hiding this comment.
Looks like the db file has been added without using git LFS, because the script validate_lfs.sh is complaining. Can you check please?
| @@ -0,0 +1,47 @@ | |||
| ## Testing database migration | |||
|
|
|||
There was a problem hiding this comment.
Thanks for the doc!
Not a big deal, but for consistency, it could be great to have a table of content.
Just manually add these 2 lines here:
<!--- TOC -->
<!--- END -->
and run ./gradlew knit to generate it.
docs/database_migration_test.md
Outdated
|
|
||
| Go to `data/data/im.vector.app.debug/files/<hash>/` | ||
| Pick the database you want to test (name can be found in SessionRealmConfigurationFactory): | ||
| - crypto_store.real for crypto |
There was a problem hiding this comment.
| - crypto_store.real for crypto | |
| - crypto_store.realm for crypto |
docs/database_migration_test.md
Outdated
| see `CryptoSanityMigrationTest` or `RealmSessionStoreMigration43Test` for sample tests. | ||
|
|
||
| There are already some databases in the assets folder. | ||
| The existing test will properly detect schema changes, and fail with such errors: |
There was a problem hiding this comment.
| The existing test will properly detect schema changes, and fail with such errors: | |
| The existing test will properly detect schema changes, and fail with such errors if a migration is missing: |
...d/src/androidTest/java/org/matrix/android/sdk/internal/database/CryptoSanityMigrationTest.kt
Outdated
Show resolved
Hide resolved
|
Please "Squash and merge" this PR, to avoid saving the big realm file to the git history. |
|
Kudos, SonarCloud Quality Gate passed!
|








Type of change
Content
Added test to ensure that crypto database migration is done
Motivation and context
Screenshots / GIFs
Tests
Tested devices
Checklist